// 前台路由
const express = require('express');
const indexController = require('../controllers/indexController');
const router = express.Router();


//果首页
router.get('/',indexController.index);

//果登录
router.get('/login',indexController.loginPage);
router.post('/login',indexController.login);

//果注册
router.get('/register',indexController.registerPage)
router.post('/register',indexController.register)

router.get('/detail/:id',indexController.detailPage)

//果发布文章
router.get('/create',indexController.createArtical);
router.post('/create',indexController.sendArtical);





module.exports = router;